package com.liohi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * 
 * @TableName dictionary
 */
@TableName(value ="dictionary")
@Data
public class Dictionary implements Serializable {
    /**
     * 
     */
    @TableId(value = "dicItemId", type = IdType.AUTO)
    private Integer dicitemid;

    /**
     * 
     */
    @TableField(value = "codeName")
    private String codename;

    /**
     * 
     */
    @TableField(value = "codeValue")
    private String codevalue;

    /**
     * 
     */
    @TableField(value = "isRanked")
    private Integer isranked;

    /**
     * 
     */
    @TableField(value = "typeCode")
    private String typecode;

    /**
     * 
     */
    @TableField(value = "parentItemId")
    private Integer parentitemid;

    /**
     * 
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 
     */
    @TableField(value = "isDelete")
    private Integer isdelete;

    /**
     * 
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Dictionary other = (Dictionary) that;
        return (this.getDicitemid() == null ? other.getDicitemid() == null : this.getDicitemid().equals(other.getDicitemid()))
            && (this.getCodename() == null ? other.getCodename() == null : this.getCodename().equals(other.getCodename()))
            && (this.getCodevalue() == null ? other.getCodevalue() == null : this.getCodevalue().equals(other.getCodevalue()))
            && (this.getIsranked() == null ? other.getIsranked() == null : this.getIsranked().equals(other.getIsranked()))
            && (this.getTypecode() == null ? other.getTypecode() == null : this.getTypecode().equals(other.getTypecode()))
            && (this.getParentitemid() == null ? other.getParentitemid() == null : this.getParentitemid().equals(other.getParentitemid()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getIsdelete() == null ? other.getIsdelete() == null : this.getIsdelete().equals(other.getIsdelete()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getDicitemid() == null) ? 0 : getDicitemid().hashCode());
        result = prime * result + ((getCodename() == null) ? 0 : getCodename().hashCode());
        result = prime * result + ((getCodevalue() == null) ? 0 : getCodevalue().hashCode());
        result = prime * result + ((getIsranked() == null) ? 0 : getIsranked().hashCode());
        result = prime * result + ((getTypecode() == null) ? 0 : getTypecode().hashCode());
        result = prime * result + ((getParentitemid() == null) ? 0 : getParentitemid().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getIsdelete() == null) ? 0 : getIsdelete().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", dicitemid=").append(dicitemid);
        sb.append(", codename=").append(codename);
        sb.append(", codevalue=").append(codevalue);
        sb.append(", isranked=").append(isranked);
        sb.append(", typecode=").append(typecode);
        sb.append(", parentitemid=").append(parentitemid);
        sb.append(", remark=").append(remark);
        sb.append(", isdelete=").append(isdelete);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}